#define _CRT_SECURE_NO_WARNINGS
#include"List.h"



void ListTest1()
{
	ListNode* plist = LTInit();
	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushFront(plist, 0);
	LTPushFront(plist, -1);
	LTPushFront(plist, -2);
	LTPushFront(plist, -3);
	LTPrint(plist);

	LTPopBack(plist);
	LTPopFront(plist);
	LTPrint(plist);

	ListNode* find=LTFind(plist, 0);
	LTInsert(find, 9);
	LTPrint(plist);

	LTErase(find);
	find = NULL;
	LTPrint(plist);

	LTDestroy(plist);
	plist = NULL;
}

int main()
{
	ListNode* plist = LTInit();
	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushFront(plist, 0);
	LTPushFront(plist, -1);
	LTPushFront(plist, -2);
	ListNode* pos = LTFind(plist, 0);
	pos->data = 9;
	LTPrint(plist);

	LTDestroy(plist);
	plist = NULL;
	return 0;
}